﻿using System;
using DevExpress.Xpo;

namespace Aij1.Model
{
    [MapInheritance(MapInheritanceType.OwnTable)]
    public class C_Customer : S_Person
    {
        public C_Customer(Session session)
            : base(session)
        {
            // This constructor is used when an object is loaded from a persistent storage.
            // Do not place any code here.
        }

        string fQQLoginId;
        [Size(32), Indexed(Unique=true)]
        public string QQLoginId
        {
            get { return fQQLoginId; }
            set { SetPropertyValue<string>("QQLoginId", ref fQQLoginId, value); }
        }

        string fTrade;
        [Size(20)]
        public string Trade
        {
            get { return fTrade; }
            set { SetPropertyValue<string>("Trade", ref fTrade, value); }
        }

        string fReceiveAddr;
        [Size(200)]
        public string ReceiveAddr
        {
            get { return fReceiveAddr; }
            set { SetPropertyValue<string>("ReceiveAddr", ref fReceiveAddr, value); }
        }

        int fIsVip;
        public int IsVip
        {
            get { return fIsVip; }
            set { SetPropertyValue<int>("IsVip", ref fIsVip, value); }
        }

        int fIsEnt;
        public int IsEnt
        {
            get { return fIsEnt; }
            set { SetPropertyValue<int>("IsEnt", ref fIsEnt, value); }
        }

        int fLevel;
        public int Level
        {
            get { return fLevel; }
            set { SetPropertyValue<int>("Level", ref fLevel, value); }
        }

        int fCountryCode;
        public int CountryCode
        {
            get { return fCountryCode; }
            set { SetPropertyValue<int>("CountryCode", ref fCountryCode, value); }
        }

        int fProvinceCode;
        public int ProvinceCode
        {
            get { return fProvinceCode; }
            set { SetPropertyValue<int>("ProvinceCode", ref fProvinceCode, value); }
        }

        int fCityCode;
        public int CityCode
        {
            get { return fCityCode; }
            set { SetPropertyValue<int>("CityCode", ref fCityCode, value); }
        }

        int fFansNum;
        public int FansNum
        {
            get { return fFansNum; }
            set { SetPropertyValue<int>("FansNum", ref fFansNum, value); }
        }

        int fIdolNum;
        public int IdolNum
        {
            get { return fIdolNum; }
            set { SetPropertyValue<int>("IdolNum", ref fIdolNum, value); }
        }

        string fIntro;
        public string Intro
        {
            get { return fIntro; }
            set { SetPropertyValue<string>("Intro", ref fIntro, value); }
        }

        string fHead;
        public string Head
        {
            get { return fHead; }
            set { SetPropertyValue<string>("Head", ref fHead, value); }
        }

        [Association("C-C"), Aggregated]
        public XPCollection<C_Child> Children
        {
            get { return GetCollection<C_Child>("Children"); }
        }

        string fFigureUrl;
        [Size(200)]
        public string FigureUrl
        {
            get { return fFigureUrl; }
            set { SetPropertyValue<string>("FigureUrl", ref fFigureUrl, value); }
        }


        string fComment;
        [Size(300)]
        public string Comment
        {
            get { return fComment; }
            set { SetPropertyValue<string>("Comment", ref fComment, value); }
        }

        string fContact;
        [Size(100)]
        public string Contact
        {
            get { return fContact; }
            set { SetPropertyValue<string>("Contact", ref fContact, value); }
        }
    }
}